package com.yc.springcloud.service.impl;


import com.yc.springcloud.dao.StorageDao;
import com.yc.springcloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author DELL
 * @Date 2024/11/19 11:53
 * @Version 1.0
 */
@Service
@Slf4j
public class storageServiceImpl implements StorageService {

	@Resource
	private StorageDao storageDao;
	
	/**
	 *
	 * @param productId
	 * @param nums
	 */
	@Override
	public void reduceProduct(Long productId, Integer nums) {
		log.info("==========seata_storage_micro_service-10010 扣 减 库 存start==========");
		storageDao.reduce(productId,nums);
		log.info("==========seata_storage_micro_service-10010 扣 减 库 存end==========");
	}
}
